<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
        <head>
          <title>scalation.activity.PetriNet</title>
          <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
          
      <link type="text/css" media="screen" rel="stylesheet" href="../../lib/template.css" />
      <script type="text/javascript" src="../../lib/jquery.js"></script>
      <script type="text/javascript" src="../../lib/jquery-ui.js"></script>
      <script type="text/javascript" src="../../lib/template.js"></script>
      <script type="text/javascript" src="../../lib/tools.tooltip.js"></script>
    
        </head>
        <body class="type">
      <div id="definition">
        <img src="../../lib/class_big.png" />
        <p id="owner"><a name="scalation" class="extype" href="../package.html">scalation</a>.<a name="scalation.activity" class="extype" href="package.html">activity</a></p>
        <h1>PetriNet</h1>
      </div>

      <h4 class="signature" id="signature">
      <span class="kind">class</span>
      <span class="symbol"> 
        <span class="name">PetriNet</span>
        
        <span class="result"> extends <a name="scalation.activity.PetriNetRules" class="extype" href="PetriNetRules.html">PetriNetRules</a> with <a name="scalation.util.Error" class="extype" href="../util/Error.html">Error</a></span>
      </span>
      </h4>
      
          <div class="fullcommenttop" id="comment"><div class="comment cmt"><p>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
This class provides a simulation engine for Hybrid Colored Petri Nets.
Reference: &quot;Discrete-event simulation of fluid stochastic Petri Nets&quot;</p></div><div class="toggleContainer block">
          <span class="toggle">Linear Supertypes</span>
          <div class="superTypes hiddenContent"><a name="scalation.util.Error" class="extype" href="../util/Error.html">Error</a>, <a name="scalation.activity.PetriNetRules" class="extype" href="PetriNetRules.html">PetriNetRules</a>, AnyRef, <span name="scala.Any" class="extype">Any</span></div>
        </div></div>
        

      <div id="template">

        <div id="mbrsel">
          <div id="textfilter"><span class="pre"></span><span class="input"><input accesskey="/" type="text" /></span><span class="post"></span></div>
          <div id="order">
                <span class="filtertype">Ordering</span>
                <ol><li class="alpha in"><span>Alphabetic</span></li><li class="inherit out"><span>By inheritance</span></li></ol>
              </div>
          <div id="ancestors">
                <span class="filtertype">Inherited</span>
                <ol><li class="hideall out"><span>Hide All</span></li>
                <li class="showall in"><span>Show all</span></li></ol>
                <ol id="linearization"><li name="scalation.activity.PetriNet" class="in"><span>PetriNet</span></li><li name="scalation.util.Error" class="in"><span>Error</span></li><li name="scalation.activity.PetriNetRules" class="in"><span>PetriNetRules</span></li><li name="scala.AnyRef" class="in"><span>AnyRef</span></li><li name="scala.Any" class="in"><span>Any</span></li></ol>
              </div>
          <div id="visbl">
              <span class="filtertype">Visibility</span>
              <ol><li class="public in"><span>Public</span></li><li class="all out"><span>All</span></li></ol>
            </div>
        </div>

        <div class="members" id="constructors">
              <h3>Instance Constructors</h3>
              <ol><li visbl="pub" name="scalation.activity.PetriNet#this" data-isabs="false">
      <a id="this:PetriNet"></a>
      <h4 class="signature">
      <span class="kind">new</span>
      <span class="symbol"> 
        <span class="name">PetriNet</span>
        
        <span class="params">(<span name="colors">colors: <span name="scala.Array" class="extype">Array</span>[Color]</span>, <span name="placeD">placeD: <span name="scala.Array" class="extype">Array</span>[<a name="scalation.activity.PlaceD" class="extype" href="PlaceD.html">PlaceD</a>]</span>, <span name="transition">transition: <span name="scala.Array" class="extype">Array</span>[<a name="scalation.activity.Transition" class="extype" href="Transition.html">Transition</a>]</span>)</span>
      </span>
      </h4>
      <p class="shortcomment cmt">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Construct a continuous Petri net (fluids, but no tokens).</p><div class="fullcomment"><div class="comment cmt"><p>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Construct a continuous Petri net (fluids, but no tokens).</p></div><dl class="paramcmts block"><dt class="param">colors</dt><dd class="cmt"><p>array of colors for fluids</p></dd><dt class="param">placeD</dt><dd class="cmt"><p>array of continuous places</p></dd><dt class="param">transition</dt><dd class="cmt"><p>array of timed transitions
</p></dd></dl></div>
    </li><li visbl="pub" name="scalation.activity.PetriNet#this" data-isabs="false">
      <a id="this:PetriNet"></a>
      <h4 class="signature">
      <span class="kind">new</span>
      <span class="symbol"> 
        <span class="name">PetriNet</span>
        
        <span class="params">(<span name="colors">colors: <span name="scala.Array" class="extype">Array</span>[Color]</span>, <span name="placeI">placeI: <span name="scala.Array" class="extype">Array</span>[<a name="scalation.activity.PlaceI" class="extype" href="PlaceI.html">PlaceI</a>]</span>, <span name="transition">transition: <span name="scala.Array" class="extype">Array</span>[<a name="scalation.activity.Transition" class="extype" href="Transition.html">Transition</a>]</span>)</span>
      </span>
      </h4>
      <p class="shortcomment cmt">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Construct a discrete Petri net (tokens, but no fluids).</p><div class="fullcomment"><div class="comment cmt"><p>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Construct a discrete Petri net (tokens, but no fluids).</p></div><dl class="paramcmts block"><dt class="param">colors</dt><dd class="cmt"><p>array of colors for tokens</p></dd><dt class="param">placeI</dt><dd class="cmt"><p>array of discrete places</p></dd><dt class="param">transition</dt><dd class="cmt"><p>array of timed transitions
</p></dd></dl></div>
    </li><li visbl="pub" name="scalation.activity.PetriNet#this" data-isabs="false">
      <a id="this:PetriNet"></a>
      <h4 class="signature">
      <span class="kind">new</span>
      <span class="symbol"> 
        <span class="name">PetriNet</span>
        
        <span class="params">(<span name="colors">colors: <span name="scala.Array" class="extype">Array</span>[Color]</span>, <span name="placeI">placeI: <span name="scala.Array" class="extype">Array</span>[<a name="scalation.activity.PlaceI" class="extype" href="PlaceI.html">PlaceI</a>]</span>, <span name="placeD">placeD: <span name="scala.Array" class="extype">Array</span>[<a name="scalation.activity.PlaceD" class="extype" href="PlaceD.html">PlaceD</a>]</span>, <span name="transition">transition: <span name="scala.Array" class="extype">Array</span>[<a name="scalation.activity.Transition" class="extype" href="Transition.html">Transition</a>]</span>)</span>
      </span>
      </h4>
      <p class="shortcomment cmt"></p><div class="fullcomment"><div class="comment cmt"></div><dl class="paramcmts block"><dt class="param">colors</dt><dd class="cmt"><p>array of colors for tokens/fluids</p></dd><dt class="param">placeI</dt><dd class="cmt"><p>array of discrete places</p></dd><dt class="param">placeD</dt><dd class="cmt"><p>array of continuous places</p></dd><dt class="param">transition</dt><dd class="cmt"><p>array of timed transitions
</p></dd></dl></div>
    </li></ol>
            </div>

        
        
        

        <div class="values members" id="values">
              <h3>Value Members</h3>
              <ol><li visbl="pub" name="scala.AnyRef#!=" data-isabs="false">
      <a id="!=(AnyRef):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">!=</span>
        
        <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scala.Any#!=" data-isabs="false">
      <a id="!=(Any):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">!=</span>
        
        <span class="params">(<span name="arg0">arg0: <span name="scala.Any" class="extype">Any</span></span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef###" data-isabs="false">
      <a id="##():Int"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">##</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Int" class="extype">Int</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#==" data-isabs="false">
      <a id="==(AnyRef):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">==</span>
        
        <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scala.Any#==" data-isabs="false">
      <a id="==(Any):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">==</span>
        
        <span class="params">(<span name="arg0">arg0: <span name="scala.Any" class="extype">Any</span></span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
    </li><li visbl="pub" name="scala.Any#asInstanceOf" data-isabs="false">
      <a id="asInstanceOf[T0]:T0"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">asInstanceOf</span>
        <span class="tparams">[<span name="T0">T0</span>]</span>
        <span class="result">: T0</span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
    </li><li visbl="pub" name="scalation.activity.PetriNetRules#calcFiringDelay" data-isabs="false">
      <a id="calcFiringDelay(Variate,VectorD,VectorI,VectorD,VectorD):Double"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">calcFiringDelay</span>
        
        <span class="params">(<span name="v">v: <a name="scalation.random.Variate" class="extype" href="../random/Variate.html">Variate</a></span>, <span name="w_t">w_t: VectorD</span>, <span name="t">t: VectorI</span>, <span name="w_f">w_f: VectorD</span>, <span name="f">f: VectorD</span>)</span><span class="result">: <span name="scala.Double" class="extype">Double</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Function to compute the delay in firing a transition.</p><div class="fullcomment"><div class="comment cmt"><p>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Function to compute the delay in firing a transition.
The base time is given by a random variate.
This is adjusted by weight vectors multiplying the number of
aggregate tokens and the aggreagate amount of fluids summed over
all input places: delay = v + w_t * t + w_f * f.</p></div><dl class="paramcmts block"><dt class="param">v</dt><dd class="cmt"><p>the random variate used to compute base firing time</p></dd><dt class="param">w_t</dt><dd class="cmt"><p>the weight for the token vector</p></dd><dt class="param">t</dt><dd class="cmt"><p>the aggregate token vector (summed over all input places)</p></dd><dt class="param">w_f</dt><dd class="cmt"><p>the weight for the fluid vector</p></dd><dt class="param">f</dt><dd class="cmt"><p>the aggregate fluid level vector (summed over all input places)
</p></dd></dl><dl class="attributes block"> <dt>Definition Classes</dt><dd><a name="scalation.activity.PetriNetRules" class="extype" href="PetriNetRules.html">PetriNetRules</a></dd></dl></div>
    </li><li visbl="pub" name="scalation.activity.PetriNet#clock" data-isabs="false">
      <a id="clock:Double"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">clock</span>
        
        <span class="result">: <span name="scala.Double" class="extype">Double</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Get the current time.</p>
    </li><li visbl="prt" name="scala.AnyRef#clone" data-isabs="false">
      <a id="clone():AnyRef"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">clone</span>
        
        <span class="params">()</span><span class="result">: AnyRef</span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a name="java.lang" class="extype" href="../../java/lang/package.html">lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
                <span class="name">@throws</span><span class="args">()</span>
              
        </dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#eq" data-isabs="false">
      <a id="eq(AnyRef):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">eq</span>
        
        <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#equals" data-isabs="false">
      <a id="equals(Any):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">equals</span>
        
        <span class="params">(<span name="arg0">arg0: <span name="scala.Any" class="extype">Any</span></span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
    </li><li visbl="prt" name="scala.AnyRef#finalize" data-isabs="false">
      <a id="finalize():Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">finalize</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a name="java.lang" class="extype" href="../../java/lang/package.html">lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
                <span class="name">@throws</span><span class="args">()</span>
              
        </dd></dl></div>
    </li><li visbl="pub" name="scalation.util.Error#flaw" data-isabs="false">
      <a id="flaw(String,String):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">flaw</span>
        
        <span class="params">(<span name="method">method: String</span>, <span name="message">message: String</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Show the flaw by printing the error message.</p><div class="fullcomment"><div class="comment cmt"><p>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Show the flaw by printing the error message.</p></div><dl class="paramcmts block"><dt class="param">method</dt><dd class="cmt"><p>the method where the error occured</p></dd><dt class="param">message</dt><dd class="cmt"><p>the error message
</p></dd></dl><dl class="attributes block"> <dt>Definition Classes</dt><dd><a name="scalation.util.Error" class="extype" href="../util/Error.html">Error</a></dd></dl></div>
    </li><li visbl="pub" name="scalation.activity.PetriNetRules#fluidFlow" data-isabs="false">
      <a id="fluidFlow(VectorD,Array[Derivative],Double,Double):VectorD"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">fluidFlow</span>
        
        <span class="params">(<span name="f">f: VectorD</span>, <span name="derv">derv: <span name="scala.Array" class="extype">Array</span>[Derivative]</span>, <span name="t0">t0: <span name="scala.Double" class="extype">Double</span></span>, <span name="d">d: <span name="scala.Double" class="extype">Double</span></span>)</span><span class="result">: VectorD</span>
      </span>
      </h4>
      <p class="shortcomment cmt">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Compute the amount of fluid to flow over an arc according to the
system of first-order Ordinary Differential Equation (ODE's):
&quot;integral derv from t0 to t&quot;.</p><div class="fullcomment"><div class="comment cmt"><p>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Compute the amount of fluid to flow over an arc according to the
system of first-order Ordinary Differential Equation (ODE's):
&quot;integral derv from t0 to t&quot;.  Supports ODE base flow models.</p></div><dl class="paramcmts block"><dt class="param">f</dt><dd class="cmt"><p>the fluid vector (amount of fluid per color)</p></dd><dt class="param">derv</dt><dd class="cmt"><p>the array of derivative functions</p></dd><dt class="param">t0</dt><dd class="cmt"><p>the current time</p></dd><dt class="param">d</dt><dd class="cmt"><p>the time delay
</p></dd></dl><dl class="attributes block"> <dt>Definition Classes</dt><dd><a name="scalation.activity.PetriNetRules" class="extype" href="PetriNetRules.html">PetriNetRules</a></dd></dl></div>
    </li><li visbl="pub" name="scalation.activity.PetriNetRules#fluidFlow" data-isabs="false">
      <a id="fluidFlow(VectorD,VectorD,VectorD,Double):VectorD"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">fluidFlow</span>
        
        <span class="params">(<span name="f">f: VectorD</span>, <span name="b">b: VectorD</span>, <span name="r">r: VectorD = <span class="symbol">null</span></span>, <span name="d">d: <span name="scala.Double" class="extype">Double</span> = <span class="symbol">0</span></span>)</span><span class="result">: VectorD</span>
      </span>
      </h4>
      <p class="shortcomment cmt">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Compute the amount of fluid to flow over an arc according to the
vector expression: b + r * (f-b) * d.</p><div class="fullcomment"><div class="comment cmt"><p>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Compute the amount of fluid to flow over an arc according to the
vector expression: b + r * (f-b) * d.  If r is 0, returns b.
Supports linear (w.r.t. time delay) and constant (d == 0) flow models.</p></div><dl class="paramcmts block"><dt class="param">f</dt><dd class="cmt"><p>the fluid vector (amount of fluid per color)</p></dd><dt class="param">b</dt><dd class="cmt"><p>the constant vector for base fluid flow</p></dd><dt class="param">r</dt><dd class="cmt"><p>the rate vector (amounts of fluids per unit time)</p></dd><dt class="param">d</dt><dd class="cmt"><p>the time delay
</p></dd></dl><dl class="attributes block"> <dt>Definition Classes</dt><dd><a name="scalation.activity.PetriNetRules" class="extype" href="PetriNetRules.html">PetriNetRules</a></dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#getClass" data-isabs="false">
      <a id="getClass():java.lang.Class[_]"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">getClass</span>
        
        <span class="params">()</span><span class="result">: java.lang.Class[_]</span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scalation.activity.PetriNet#getCommandQueue" data-isabs="false">
      <a id="getCommandQueue:SynchronizedQueue[AnimateCommand]"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">getCommandQueue</span>
        
        <span class="result">: <span name="scala.collection.mutable.SynchronizedQueue" class="extype">SynchronizedQueue</span>[<a name="scalation.animation.AnimateCommand" class="extype" href="../animation/AnimateCommand.html">AnimateCommand</a>]</span>
      </span>
      </h4>
      <p class="shortcomment cmt">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Get the animation command queue.</p>
    </li><li visbl="pub" name="scala.AnyRef#hashCode" data-isabs="false">
      <a id="hashCode():Int"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">hashCode</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Int" class="extype">Int</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
    </li><li visbl="pub" name="scalation.activity.PetriNet#initAnimation" data-isabs="false">
      <a id="initAnimation(Array[Color],Double):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">initAnimation</span>
        
        <span class="params">(<span name="gColors">gColors: <span name="scala.Array" class="extype">Array</span>[Color] = <span name='<span class="name"><a href="../package.html">Array (yellow, gold, silver, lightyellow)</a></span>' class="defval">...</span></span>, <span name="timeDilationFactor">timeDilationFactor: <span name="scala.Double" class="extype">Double</span> = <span class="symbol">1000.</span></span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Initialize the animation by drawing the Petri net components onto the
animation drawing panel using animation commands.</p><div class="fullcomment"><div class="comment cmt"><p>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Initialize the animation by drawing the Petri net components onto the
animation drawing panel using animation commands.</p></div><dl class="paramcmts block"><dt class="param">gColors</dt><dd class="cmt"><p>the colors for nodes and edges in the graph
                           i.e., discrete-places, continuous-places, transitions and arcs
</p></dd><dt class="param">timeDilationFactor</dt><dd class="cmt"><p>time dilation is used to speed up/slow down animation</p></dd></dl></div>
    </li><li visbl="pub" name="scala.Any#isInstanceOf" data-isabs="false">
      <a id="isInstanceOf[T0]:Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">isInstanceOf</span>
        <span class="tparams">[<span name="T0">T0</span>]</span>
        <span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#ne" data-isabs="false">
      <a id="ne(AnyRef):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">ne</span>
        
        <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#notify" data-isabs="false">
      <a id="notify():Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">notify</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#notifyAll" data-isabs="false">
      <a id="notifyAll():Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">notifyAll</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scalation.activity.PetriNet#simulate" data-isabs="false">
      <a id="simulate(Double,Double):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">simulate</span>
        
        <span class="params">(<span name="tStart">tStart: <span name="scala.Double" class="extype">Double</span></span>, <span name="tStop">tStop: <span name="scala.Double" class="extype">Double</span></span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Simulate the execution of the Petri Net.</p><div class="fullcomment"><div class="comment cmt"><p>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Simulate the execution of the Petri Net.</p></div><dl class="paramcmts block"><dt class="param">tStart</dt><dd class="cmt"><p>the starting time for the simulation</p></dd><dt class="param">tStop</dt><dd class="cmt"><p>the stopping time for the simulation
</p></dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#synchronized" data-isabs="false">
      <a id="synchronized[T0](⇒ T0):T0"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">synchronized</span>
        <span class="tparams">[<span name="T0">T0</span>]</span>
        <span class="params">(<span name="arg0">arg0: ⇒ T0</span>)</span><span class="result">: T0</span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scalation.activity.PetriNetRules#thresholdD" data-isabs="false">
      <a id="thresholdD(VectorD,VectorD):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">thresholdD</span>
        
        <span class="params">(<span name="f">f: VectorD</span>, <span name="b">b: VectorD</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Return whether the vector inequality is true: f &gt;= b.</p><div class="fullcomment"><div class="comment cmt"><p>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Return whether the vector inequality is true: f &gt;= b.
The firing threshold should be checked for every incoming arc.
If all return true, the transition should fire.</p></div><dl class="paramcmts block"><dt class="param">f</dt><dd class="cmt"><p>The fluid vector (amount of fluid per color)</p></dd><dt class="param">b</dt><dd class="cmt"><p>The base constant vector
</p></dd></dl><dl class="attributes block"> <dt>Definition Classes</dt><dd><a name="scalation.activity.PetriNetRules" class="extype" href="PetriNetRules.html">PetriNetRules</a></dd></dl></div>
    </li><li visbl="pub" name="scalation.activity.PetriNetRules#thresholdI" data-isabs="false">
      <a id="thresholdI(VectorI,VectorI):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">thresholdI</span>
        
        <span class="params">(<span name="t">t: VectorI</span>, <span name="b">b: VectorI</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Return whether the vector inequality is true: t &gt;= b.</p><div class="fullcomment"><div class="comment cmt"><p>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Return whether the vector inequality is true: t &gt;= b.
The firing threshold should be checked for every incoming arc.
If all return true, the transition should fire.</p></div><dl class="paramcmts block"><dt class="param">t</dt><dd class="cmt"><p>the token vector (number of tokens per color)</p></dd><dt class="param">b</dt><dd class="cmt"><p>the base constant vector
</p></dd></dl><dl class="attributes block"> <dt>Definition Classes</dt><dd><a name="scalation.activity.PetriNetRules" class="extype" href="PetriNetRules.html">PetriNetRules</a></dd></dl></div>
    </li><li visbl="pub" name="scalation.activity.PetriNet#toString" data-isabs="false">
      <a id="toString():String"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">toString</span>
        
        <span class="params">()</span><span class="result">: <span name="java.lang.String" class="extype">String</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Convert the Petri net to the string representation.</p><div class="fullcomment"><div class="comment cmt"><p>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Convert the Petri net to the string representation.
</p></div><dl class="attributes block"> <dt>Definition Classes</dt><dd><a name="scalation.activity.PetriNet" class="extype" href="">PetriNet</a> → AnyRef → Any</dd></dl></div>
    </li><li visbl="pub" name="scalation.activity.PetriNetRules#tokenFlow" data-isabs="false">
      <a id="tokenFlow(VectorI,VectorI,VectorI,Double):VectorI"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">tokenFlow</span>
        
        <span class="params">(<span name="t">t: VectorI</span>, <span name="b">b: VectorI</span>, <span name="r">r: VectorI = <span class="symbol">null</span></span>, <span name="d">d: <span name="scala.Double" class="extype">Double</span> = <span class="symbol">0</span></span>)</span><span class="result">: VectorI</span>
      </span>
      </h4>
      <p class="shortcomment cmt">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Compute the number of tokens to flow over an arc according to the
vector expression: b + r * (t-b) * d.</p><div class="fullcomment"><div class="comment cmt"><p>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Compute the number of tokens to flow over an arc according to the
vector expression: b + r * (t-b) * d.  If d is 0, returns b.
Supports linear (w.r.t. time delay) and constant (d == 0) flow models.</p></div><dl class="paramcmts block"><dt class="param">t</dt><dd class="cmt"><p>the token vector (number of tokens per color)</p></dd><dt class="param">b</dt><dd class="cmt"><p>the constant vector for base token flow</p></dd><dt class="param">r</dt><dd class="cmt"><p>the rate vector (number of tokens per unit time)</p></dd><dt class="param">d</dt><dd class="cmt"><p>the time delay
</p></dd></dl><dl class="attributes block"> <dt>Definition Classes</dt><dd><a name="scalation.activity.PetriNetRules" class="extype" href="PetriNetRules.html">PetriNetRules</a></dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#wait" data-isabs="false">
      <a id="wait():Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">wait</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
                <span class="name">@throws</span><span class="args">()</span>
              
        </dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#wait" data-isabs="false">
      <a id="wait(Long,Int):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">wait</span>
        
        <span class="params">(<span name="arg0">arg0: <span name="scala.Long" class="extype">Long</span></span>, <span name="arg1">arg1: <span name="scala.Int" class="extype">Int</span></span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
                <span class="name">@throws</span><span class="args">()</span>
              
        </dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#wait" data-isabs="false">
      <a id="wait(Long):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol"> 
        <span class="name">wait</span>
        
        <span class="params">(<span name="arg0">arg0: <span name="scala.Long" class="extype">Long</span></span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
                <span class="name">@throws</span><span class="args">()</span>
              
        </dd></dl></div>
    </li></ol>
            </div>

        <div name="scalation.util.Error" class="parent">
              <h3>Inherited from <a name="scalation.util.Error" class="extype" href="../util/Error.html">Error</a></h3>
            </div><div name="scalation.activity.PetriNetRules" class="parent">
              <h3>Inherited from <a name="scalation.activity.PetriNetRules" class="extype" href="PetriNetRules.html">PetriNetRules</a></h3>
            </div><div name="scala.AnyRef" class="parent">
              <h3>Inherited from AnyRef</h3>
            </div><div name="scala.Any" class="parent">
              <h3>Inherited from <span name="scala.Any" class="extype">Any</span></h3>
            </div>

      </div>
      
      <div id="tooltip"></div>
      
    </body>
      </html>